package com.leyou.client.seckill;

import com.leyou.seckill.pojo.Seckill;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.Map;

/**
 * 远程调用秒杀接口
 *
 * @Author jie
 * @Date 2020/11/21
 */
@FeignClient("seckill-service")
public interface SeckillClient {

    /**
     * 根据id查询秒杀商品
     */
    @GetMapping("/seckill")
    Seckill findSeckillById(Long id);

    /**
     * 根据id修改秒杀商品库存
     */
    @PutMapping("/updateSeckill")
    Void updateSeckill(Map<String,String> cartMap);
}
